//============================================================================
// Name        : Encoder.h
// Author      : lucmir@dcc.ufmg.br
// Description :
//============================================================================


#ifndef ENCODER_H_
#define ENCODER_H_

#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <cctype>
#include <algorithm>

#define UNICODE_MAX 0x10FFFFul


class Encoder {

	public:

		/**
		 * Function to decode html entities for a term.
		 *
		 * if `src` is `NULL`, input will be taken from `dest`, decoding
		 * the entities in-place. Otherwise, the output will be placed in `dest`,
		 * which should point to a buffer big enough to hold `strlen(src) + 1`
		 * characters, while `src` remains unchanged.
		 * The function returns the length of the decoded string.
		 */
		static unsigned int decode_html_entities_utf8(char *dest, const char *src);

		/**
		 * Function to convert a string to lower case
		 */
		static void toLower(char *str);

};

#endif
